//
//  RuleCell.m
//  WanCaiC8
//
//  Created by tangang on 2018/7/17.
//  Copyright © 2018年 tangang. All rights reserved.
//

#import "RuleCell.h"

@implementation RuleCell{
    QXLable *labTitle;
}
- (instancetype)initWithFrame:(CGRect)frame{
    if (self=[super initWithFrame:frame]) {
        labTitle=[[QXLable alloc]init];
        
        labTitle.textAlignment=NSTextAlignmentCenter;
        labTitle.layer.masksToBounds=YES;
        labTitle.layer.cornerRadius=15.0;
        [self.contentView addSubview:labTitle];
        [labTitle mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.contentView).with.insets(UIEdgeInsetsMake(real_size(10), real_size(10), real_size(10), real_size(10)));
        }];
    }
    return self;
}

- (void)setModel:(PlayRuleModel *)model{
    labTitle.text=model.PlayName;
}

- (void)setIsSelected:(BOOL)isSelected{
    if (isSelected) {
        labTitle.textColor=[UIColor whiteColor];
        labTitle.backgroundColor=NAVCOLOR;
    }else{
        labTitle.textColor=DEFAULTTEXTBLACKCOLOR;
        labTitle.backgroundColor=DEFAULTBGCOLOR;
    }
}

@end
